package com.acmedcare.framework.exchange.center.core.json;

import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.module.SimpleModule;

public class PluginSubTypeModule extends SimpleModule {

  private Class<?>[] subtypes;

  public PluginSubTypeModule(Class<?>... subtypes) {
    this.subtypes = subtypes;
  }

  @Override
  public void setupModule(Module.SetupContext context) {
    context.registerSubtypes(this.subtypes);
    super.setupModule(context);
  }
}
